import React from 'react'
import { connect } from 'react-redux'
import { Dispatch, bindActionCreators } from 'redux'
import { RootState } from 'src/redux'
//ui
//comp
//ds
//redux
import { MainInfoState } from './reducer';



export interface MainInfoProps {
    state: MainInfoState;
}

export const _MainInfo: React.SFC<MainInfoProps> = (props) => {
    const { state } = props;

    return (
        <div style={{ fontSize: '3em' }}>
            {state.word}
        </div>
    );
}

const mapStateToProps = (state: RootState) => ({
    state: state.MainInfoState
})

const mapDispatchToProps = (dispatch: Dispatch) =>
    bindActionCreators({
    }, dispatch)

/**
 * 得到当前过滤器并渲染 Link。
 */
const MainInfo = connect(
    mapStateToProps,
    mapDispatchToProps
)(_MainInfo)

export default MainInfo